#!/bin/bash

app=$(kubectl get secrets | grep "\.mongo" | cut -d' ' -f1 | fzf -m)
echo $app
conn_string=$(kubectl get secret $app --template='{{.data.url}}' | base64 -d)
echo "mongo url=\"${conn_string}\""
#docker run -it --net=host mongo mongo ${conn_string}
mongosh ${conn_string}
